package com.wayhome.srpingbootmybatis.mbs.util;

public enum ApplyExitReaEnum {

    APPLY_EXIT_REA_1("1", "住院天数超过上年度该统筹区同级别定点医疗机构该病组(DRG)/病种(DIP)平均住院天数%s倍(含)的"),
    APPLY_EXIT_REA_2("2", "住院总费用超过上年度该统筹区同级别定点医疗机构该病组(DRG)/病种(DIP)次均住院费用%s倍(含)的"),
    APPLY_EXIT_REA_3("3", "监护病房床位使用天数超过该病例住院床位使用总天数60%(含)的"),
    APPLY_EXIT_REA_4("4", "需转科或多学科联合诊疗的疑难复杂病例"),
    APPLY_EXIT_REA_5("5", "因运用创新医疗技术和创新药导致费用较高的"),
    ;
    private ApplyExitReaEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private String code;
    private String msg;

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static String getMsgByCode(String code) {
        for (ApplyExitReaEnum item : ApplyExitReaEnum.values()) {
            if (item.code.equals(code)) {
                return item.msg;
            }
        }
        return null;
    }

    public static String getCodeByMsg(String msg) {
        for (ApplyExitReaEnum item : ApplyExitReaEnum.values()) {
            if (item.msg.equals(msg)) {
                return item.code;
            }
        }
        return null;
    }
}
